package com.zhanglingfei.yuekaoclient.controller;


import com.zhanglingfei.yuekaoclient.feign.BasicsFeignClient;
import freemarker.core.ReturnInstruction;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author zhanglingfei
 * @since 2022-04-22
 */
@Slf4j
@RestController
@RequestMapping("/client")
public class ClientController {

    @Autowired
    private BasicsFeignClient basicsFeignClient;

    @GetMapping("test")
    public String testFeign() {
        log.info("now:{}",new Date());
        long time = System.currentTimeMillis();
        String test = basicsFeignClient.test();
        log.info("time:{}",System.currentTimeMillis()-time);
        return test;
    }

}
